<!DOCTYPE html>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=7" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?php echo $this->cfg['title'];?></title>
<meta name="Keywords" content="<?php echo $this->cfg['keywords'];?>" /> 
<meta name="Description" content="<?php echo $this->cfg['description'];?>" /> 
<meta name="robots" content="index, follow" /> 
<meta name="googlebot" content="index, follow" />

<link href="<?php echo $this->baseUrl;?>/style/global.css" rel="stylesheet" type="text/css" />
<script language="javascript" type="text/javascript" src="<?php echo $this->baseUrl;?>/js/jquery.pack.js" /></script>
<script language="javascript" type="text/javascript" src="<?php echo $this->baseUrl;?>/js/common.js" /></script>

<script language="javascript" type="text/javascript">
var aurl = "<?php echo $this->url($this->baseUrl, 'stat', 'd', 'id=');?>";
$(function (){
	$('#index_tab a').click(function (){
		$.get(aurl+$(this).attr('d'));
	});
	setTimeout(function (){
		location.reload();
	}, 5 * 60 * 1000);
});
</script>
</head>
<body>
<?php if (empty($this->only)) $this->render("header.php");?>

<div class="table1_index">
	<img src="<?php echo $this->baseUrl;?>/images/t1.png" width="1000px" height="26px">
    <table id="index_tab">
<?php
foreach ($this->sf as $v){
$t = strtotime($v['sdatetime']);
$sdatetime = date("m月/d日/H点", $t);
if (date("i", $t) == 30){
	$sdatetime.="30分";
}

$introext = '';
$tclass = 'class="red"';

// 当前半小时的内的开服广告 精品全天推荐信息 全天固顶
if ($v['type'] == 'current_hour' || $v['isbest'] || $v['isdayfine']){
	$introext = '<span class="red b">-推荐</span>';
}
// 当天已过时间档广告和未到时间档广告  当天通宵固顶和通宵推荐
if ($v['type'] == 'past' || $v['type'] == 'next' || $v['isfinehot'] ||$v['ishot']){
	$introext = '<span class="blue b">-推荐</span>';
}
if ($v['isfinehot']){
	$sdatetime = '<span class="red b">◆通宵固顶◆</span>';
}
if ($v['ishot']){
	$sdatetime = date("m月/d日", $t) . '<span class="red b">★通宵推荐★</span>';
}
if ($v['isdayfine']){
	$sdatetime = '<span class="green b">★★精品全天推荐★★</span>';
}
if ($v['isbest']){
	$sdatetime = '<span class="red b">◆◆全天固顶◆◆</span>';
}
if ($v['type'] == 'mt_bt' || $v['type'] == 'ht'){
	$tclass = 'class="blue"';
	$introext = '<span class="blue b">-推荐</span>';
}
echo <<<EOT
<tr>
	<td width="126"><a d="{$v['id']}" href="{$v['url']}" target="_blank">{$v['name']}</a></td>
    <td width="108"><a d="{$v['id']}" href="{$v['url']}" target="_blank">{$v['ip']}</a></td>
    <td width="157"><a d="{$v['id']}" href="{$v['url']}" target="_blank" {$tclass}>{$sdatetime}</a></td>
    <td width="90"><a d="{$v['id']}" href="{$v['url']}" target="_blank">{$v['routeline']}</a></td>
    <td width="299"><a d="{$v['id']}" href="{$v['url']}" target="_blank">{$v['intro']}</a>{$introext}</td>
    <td width="128"><a d="{$v['id']}" href="{$v['url']}" target="_blank"">{$v['qq']}</a></td>
	<td width="60"><a d="{$v['id']}" href="{$v['url']}" target="_blank">点击查看</a></td>
</tr>
EOT;
}?>      
    </table>
</div>
<?php
if (empty($this->only)){
?>
<p class="tip_index"><a href="#jztop"></a>
	↓<span class="red">以下是最新加盟的家族列表</span>↓
	要显示在TOP-10里面获得更多人气吗?那就赶快发动全家族成员来点击[支持该家族]吧！当人气到达一定限度，会自动到顶部！    
</p>
<table class="table2_index">
	<thead>
	<th width="132">家族名称</th>
	<th width="103">家族QQ群</th>
	<th width="98">家族老大</th>
	<th width="127">游戏版本</th>
	<th width="52">主页</th>
	<th width="69">地区线路</th>
	<th width="101">家族创建日期</th>	  
	<th width="59">支持度</th>
	<th width="161">TOP排名<span class="yellow">点击按钮进行投票</span></th>
	</thead>
    <tbody>
<?php
foreach ($this->jzlist as $v){
$name = htmlspecialchars($v['name']);
$title = $name;
$qqqun = htmlspecialchars($v['qqqun']);
$master = htmlspecialchars($v['master']);
$version = htmlspecialchars($v['version']);
$intro = htmlspecialchars($v['intro']);
$v['url'] = htmlspecialchars($v['url']);

	print <<<EOT
    	<tr>
        	<td>{$v['id']}{$name}</td>
        	<td>{$qqqun}</td>
        	<td>{$master}</td>
        	<td>{$version}</td>
        	<td><a href="{$v['url']}" target="_blank">主页</a></td>
        	<td>{$intro}</td>  
        	<td>{$v['createtime']}</td>
        	<td id="jzh_{$v['id']}">{$v['hits']}</td>
        	<td><input onclick="javascript:return jz({$v['id']});" name="x" type="button" value="支持该家族"></td>
        </tr>
EOT;
}?>
    </tbody>
</table>

<?php
$indexurl =$this->url($this->baseUrl, 'index', 'index', array("jz" => substr(md5(1 . $this->cfg['slot']), 10, 5) . 1));
$nexturl = $this->url($this->baseUrl, 'index', 'index', array("jz" => substr(md5($this->jzpage['next'] . $this->cfg['slot']), 10, 5) . $this->jzpage['next']));
$preurl = $this->url($this->baseUrl, 'index', 'index', array("jz" => substr(md5($this->jzpage['previous'] . $this->cfg['slot']), 10, 5) . $this->jzpage['previous']));
$lasturl = $this->url($this->baseUrl, 'index', 'index',array("jz" => substr(md5($this->jzpage['totalpage'] . $this->cfg['slot']), 10, 5) . $this->jzpage['totalpage']));
echo <<<EOT
<p class="pagenum">
	共{$this->jzpage['totalnum']}条记录
    <a href="$indexurl">首页</a>
    <a href="$preurl">上页</a>
    <a href="$nexturl">下页</a>
    <a href="$lasturl">尾页</a>
    页次：{$this->jzpage['nowp']}/{$this->jzpage ['totalpage']}页
    10条记录/页                    
</p>
EOT;
?>

<table class="table3_index">
	<thead>
    	<th>文章标题</th>
		<th>更新时间</th>    
    </thead>
    <tbody>
<?php
foreach ($this->article as $v){
	$id = substr(md5($v['aid'] . $this->cfg['slot']), 20, 5) . $v['aid'];
	$url = $this->url($this->baseUrl, "index", "article", array("show" => $id));
	$v['pubtime'] = substr($v['pubtime'], 0, 10);
	echo <<<EOT
	<tr>
		<td style="text-align:left; padding:0px 0px 0px 30px"><a href="{$url}">{$v['title']}</a></td>
		<td>{$v['pubtime']}</td>
	</tr>
EOT;
}?>
    </tbody>
</table>

<?php $this->render("footer.php");?>

<?php
}
?>
</body>
</html>
<script type="text/javascript">
var _bdhmProtocol = (("https:" == document.location.protocol) ? " https://" : " http://");
document.write(unescape("%3Cscript src='" + _bdhmProtocol + "hm.baidu.com/h.js%3F0e82cb10e418a3f5173a4cf23716d6cc' type='text/javascript'%3E%3C/script%3E"));
</script>